<template functional>
    <a-menu-item :key="props.currentRoute.path">
        <router-link v-if="props.currentRoute.path" :to="props.currentRoute.path" :target="props.currentRoute.isExternal=='true'?'_blank':'_self'">
            <template v-if="props.currentRoute.meta && props.currentRoute.meta.icon">
                <svg-icon :icon="props.currentRoute.meta.icon || 'user'"> </svg-icon>
            </template>
            <template v-if="props.currentRoute.meta && props.currentRoute.meta.title">
                <span style="margin-left: 16px" class="menu-title">{{ props.currentRoute.meta.title }}</span>
            </template>
        </router-link>
    </a-menu-item>
</template>

<script>
export default {
    name: 'menuItem',
    props: {
        currentRoute: {
            type: Object | String,
            default: () => { }
        }
    }
};
</script>
